#!/usr/bin/perl 
 
use Games::RolePlay::MapGen;

 my $map = Games::RolePlay::MapGen->new({
  tile_size    => 10,
  cell_size    => "50x50", 
  num_rooms    => "2d4", 
  bounding_box => "50x50",
  max_room_size => "10x10",
  min_room_size => "5x5"
}); 

#my $map = Games::RolePlay::MapGen->import_xml("maptemplate.xml");

$map->set_generator("Basic");             # This is actually the default generator,
#$map->add_generator_plugin("BasicDoors"); # however, you must add the doors.
$map->generate("map.txt");                # It'll generate a text map by default.
$map->export("map.txt");
$map->set_exporter( "XML" );              # But an xml map is probably more useful.
$map->export("map.xml");
$map->set_exporter( "PNG" );              # But a graphical map is probably more useful.
$map->export("map.png");